<?php echo $head; ?>
<style>
	.field{
		clear:both;
		color:#333;
		border:1px solid #C6C4B3;
		border-bottom:none;
	}
	
	.field .col1{
		float:left;
		width:25%;
		padding: 7px 0 4px 9px;		
	}
	
	.field .col2{
		padding: 7px 0 4px 9px;
		margin-left:25%;		
		border-left:1px solid #C6C4B3;		
	}
	
</style>
</head>
<body>
<div id="layout">
<?php echo $header; ?>

<div id="pageBody" class="clearfix">
<div id="primary">
<dl class="schedule">
<dt class="scheduleTitle"><span><?php echo $lang["contact"]["title"]; ?> » <?php echo $lang["general"]["detail"]; ?></span></dt>
<dd class="schedulecontent">
<div class="scheduleBlock clearfix">
<?php echo $msg; ?>
<form method="post" enctype="multipart/form-data" action="<?php echo $base_link; ?>done">
<input type="hidden" name="contact_id" value="<?php echo $contact_id; ?>" />
<table>
<tbody>      
    <tr>
        <th><?php echo $lang["contact"]["name"]; ?></th>
        <td><?php echo $name; ?></td>
    </tr>
    <tr>
        <th><?php echo $lang["contact"]["email"]; ?></th>
        <td><?php echo $email; ?></td>
    </tr>
    <tr>
        <th><?php echo $lang["contact"]["tel"]; ?></th>
        <td><?php echo $tel; ?></td>
    </tr>
    <tr>
        <th><?php echo $lang["contact"]["address"]; ?></th>
        <td><?php echo $name; ?></td>
    </tr>
    <tr>
        <th><?php echo $lang["contact"]["content"]; ?></th>
        <td><?php echo $content; ?></td>
    </tr>  
</tbody>
</table>
<ul class="buSubmit">
<li class="buSubmitLast"><a href="<?php echo $base_link; ?>"><img src="<?php echo base_common_admin; ?>images/<?php echo $language; ?>/bu_back.gif" alt="<?php echo $lang["general"]["back"]; ?>" /></a></li>
<!-- / class buSubmit --></ul>

</form>
<br />
<div id="reply" style="float:left; font-weight:bold; font-size:16px; color:#1B73B0; cursor:pointer;"><?php echo $lang["contact"]["reply"]; ?></div>
<div style="clear:both;"></div>
<div id="reply_content" style="display:none;">
<form method="POST" action="<?php echo $base_link; ?>view/<?php echo $contact_id; ?>">
	<div class="field">
		<div class="col1"><?php echo $lang["contact"]["mail_title"]; ?><span class="required">※</span></div>
        <div class="col2"><input class="sizem" type="text" name="mail_title" value="<?php echo $mail_title; ?>" /><?php echo $errorms_mail_title; ?></div>
	</div>
    <!--
    <div class="field">
		<div class="col1"><?php echo $lang["contact"]["reply_to"]; ?><span class="required">※</span></div>
        <div class="col2"><input class="sizem" type="text" name="reply_to" value="<?php echo $reply_to; ?>" /><?php echo $errorms_reply_to; ?></div>
	</div>
    -->
    <div class="field" style="border-bottom:1px solid #C6C4B3;">
		<div class="col1"><?php echo $lang["contact"]["content"]; ?><span class="required">※</span></div>
        <div class="col2"><textarea id="mail_content" name="mail_content"><?php echo $mail_content; ?></textarea><?php echo $errorms_content; ?></div>
	</div>
<ul class="buSubmit">
<li class="buSubmitLast"><input type="image" src="<?php echo base_common_admin; ?>images/<?php echo $language; ?>/bu_check.gif" alt="<?php echo $lang["general"]["confirm"]; ?>" /></li>
<!-- / class buSubmit --></ul>
</form>
</div>

</div></dd>
<!-- / class schedule --></dl>
<!-- / id primary --></div>

<?php echo $menu; ?>

<!-- / id pageBody --></div>
<!-- / id layout --></div>
<?php echo $footer; ?>
</body>
</html>
<script type="text/javascript">
	$("#reply").click(function(){
		$("#reply_content").toggle(300);		
	});
	<?php if($chk_post) : ?>
		$("#reply_content").show();
		$('html, body').animate({scrollTop:$("#reply_content").offset().top - 30}, 500);
	<?php endif; ?>
</script>
<?php
	include_once(APPPATH . "/../common/ckeditor/ckeditor.php");
	include_once(APPPATH . "/../common/ckfinder/ckfinder.php");
	$ckeditor = new CKEditor();
	$ckeditor->basePath = base . "common/ckeditor/";
	CKFinder::SetupCKEditor($ckeditor, base . "common/ckfinder/");
	$la = strtolower($language);
	$ckeditor->replace("mail_content", array("language" => $la));
?>